<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2">
<meta name="theme-color" content="#222">
<meta name="generator" content="Hexo 4.2.1">
  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png">
  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.png">
  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.png">
  <link rel="mask-icon" href="/images/logo.svg" color="#222">
  <meta name="google-site-verification" content="yF8HXsFuCTrePDFRnSkN2kkzV2ypBjtywzXsfVXOOV8">
  <meta name="baidu-site-verification" content="VxrVAiQAZ9">

<link rel="stylesheet" href="/css/main.css">


<link rel="stylesheet" href="/lib/font-awesome/css/all.min.css">

<script id="hexo-configurations">
    var NexT = window.NexT || {};
    var CONFIG = {"hostname":"yang0033.gitee.io","root":"/","scheme":"Gemini","version":"7.8.0","exturl":false,"sidebar":{"position":"left","display":"post","padding":18,"offset":12,"onmobile":false},"copycode":{"enable":true,"show_result":true,"style":null},"back2top":{"enable":true,"sidebar":false,"scrollpercent":false},"bookmark":{"enable":false,"color":"#222","save":"auto"},"fancybox":false,"mediumzoom":false,"lazyload":false,"pangu":false,"comments":{"style":"tabs","active":null,"storage":true,"lazyload":false,"nav":null},"algolia":{"hits":{"per_page":10},"labels":{"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}},"localsearch":{"enable":true,"trigger":"auto","top_n_per_article":1,"unescape":true,"preload":true},"motion":{"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},"path":"search.xml"};
  </script>

  <meta name="description" content="使用 agvtool 管理项目版本号 背景：发包后当版本号相同时，无法判断包的新旧，另外，苹果在上传包时也必须保证同一版本不允许上传相同build号的 IPA 文件，为此，开发了动态更新 ipa 包 build 号功能。   经过一系列调研和测试，目前 iOS 主项目使用的版本号生成策略为两个：">
<meta property="og:type" content="article">
<meta property="og:title" content="使用 agvtool 管理项目版本号">
<meta property="og:url" content="http://yang0033.gitee.io/2018/11/08/iOS%20%E4%BD%BF%E7%94%A8%20agvtool%20%E7%AE%A1%E7%90%86%E9%A1%B9%E7%9B%AE%E7%89%88%E6%9C%AC%E5%8F%B7/index.html">
<meta property="og:site_name" content="SuperYang&#96;s Blog">
<meta property="og:description" content="使用 agvtool 管理项目版本号 背景：发包后当版本号相同时，无法判断包的新旧，另外，苹果在上传包时也必须保证同一版本不允许上传相同build号的 IPA 文件，为此，开发了动态更新 ipa 包 build 号功能。   经过一系列调研和测试，目前 iOS 主项目使用的版本号生成策略为两个：">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://upload-images.jianshu.io/upload_images/1445110-5322f5973538068e.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/600">
<meta property="og:image" content="https://upload-images.jianshu.io/upload_images/1445110-7f5985df3b9d38d3.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/600">
<meta property="og:image" content="https://upload-images.jianshu.io/upload_images/1445110-1471c876fb4fc96b.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/800">
<meta property="og:image" content="https://upload-images.jianshu.io/upload_images/1445110-371f53522c4028f2.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/300">
<meta property="og:image" content="https://upload-images.jianshu.io/upload_images/1445110-97b3414bad90bcb7.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/600">
<meta property="og:image" content="https://upload-images.jianshu.io/upload_images/1445110-d873152660f1da69.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/600">
<meta property="og:image" content="https://upload-images.jianshu.io/upload_images/1445110-84befb049b7f32d6.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/800">
<meta property="og:image" content="https://upload-images.jianshu.io/upload_images/1445110-cb5d03d439901b0c.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240">
<meta property="article:published_time" content="2018-11-08T10:14:00.000Z">
<meta property="article:modified_time" content="2020-07-09T08:00:54.327Z">
<meta property="article:author" content="SuperYang">
<meta property="article:tag" content="工程管理">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://upload-images.jianshu.io/upload_images/1445110-5322f5973538068e.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/600">

<link rel="canonical" href="http://yang0033.gitee.io/2018/11/08/iOS%20%E4%BD%BF%E7%94%A8%20agvtool%20%E7%AE%A1%E7%90%86%E9%A1%B9%E7%9B%AE%E7%89%88%E6%9C%AC%E5%8F%B7/">


<script id="page-configurations">
  // https://hexo.io/docs/variables.html
  CONFIG.page = {
    sidebar: "",
    isHome : false,
    isPost : true,
    lang   : 'zh-CN'
  };
</script>

  <title>使用 agvtool 管理项目版本号 | SuperYang`s Blog</title>
  
    <script async src="https://www.googletagmanager.com/gtag/js?id=UA-71812998-3"></script>
    <script>
      if (CONFIG.hostname === location.hostname) {
        window.dataLayer = window.dataLayer || [];
        function gtag(){dataLayer.push(arguments);}
        gtag('js', new Date());
        gtag('config', 'UA-71812998-3');
      }
    </script>


  <script>
    var _hmt = _hmt || [];
    (function() {
      var hm = document.createElement("script");
      hm.src = "https://hm.baidu.com/hm.js?8ff3295288514de6f89f314c23ee40ab";
      var s = document.getElementsByTagName("script")[0];
      s.parentNode.insertBefore(hm, s);
    })();
  </script>




  <noscript>
  <style>
  .use-motion .brand,
  .use-motion .menu-item,
  .sidebar-inner,
  .use-motion .post-block,
  .use-motion .pagination,
  .use-motion .comments,
  .use-motion .post-header,
  .use-motion .post-body,
  .use-motion .collection-header { opacity: initial; }

  .use-motion .site-title,
  .use-motion .site-subtitle {
    opacity: initial;
    top: initial;
  }

  .use-motion .logo-line-before i { left: initial; }
  .use-motion .logo-line-after i { right: initial; }
  </style>
</noscript>

</head>

<body itemscope itemtype="http://schema.org/WebPage">
  <div class="container use-motion">
    <div class="headband"></div>

    <header class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-container">
  <div class="site-nav-toggle">
    <div class="toggle" aria-label="切换导航栏">
      <span class="toggle-line toggle-line-first"></span>
      <span class="toggle-line toggle-line-middle"></span>
      <span class="toggle-line toggle-line-last"></span>
    </div>
  </div>

  <div class="site-meta">

    <a href="/" class="brand" rel="start">
      <span class="logo-line-before"><i></i></span>
      <h1 class="site-title">SuperYang`s Blog</h1>
      <span class="logo-line-after"><i></i></span>
    </a>
      <p class="site-subtitle" itemprop="description">落魄程序员在线炒饭</p>
  </div>

  <div class="site-nav-right">
    <div class="toggle popup-trigger">
        <i class="fa fa-search fa-fw fa-lg"></i>
    </div>
  </div>
</div>




<nav class="site-nav">
  <ul id="menu" class="main-menu menu">
        <li class="menu-item menu-item-home">

    <a href="/" rel="section"><i class="fa fa-home fa-fw"></i>首页</a>

  </li>
        <li class="menu-item menu-item-about">

    <a href="/about/" rel="section"><i class="fa fa-user fa-fw"></i>关于</a>

  </li>
        <li class="menu-item menu-item-tags">

    <a href="/tags/" rel="section"><i class="fa fa-tags fa-fw"></i>标签</a>

  </li>
        <li class="menu-item menu-item-categories">

    <a href="/categories/" rel="section"><i class="fa fa-th fa-fw"></i>分类</a>

  </li>
        <li class="menu-item menu-item-archives">

    <a href="/archives/" rel="section"><i class="fa fa-archive fa-fw"></i>归档</a>

  </li>
        <li class="menu-item menu-item-message">

    <a href="/message/" rel="section"><i class="fa fa-music fa-fw"></i>留言板 | Music</a>

  </li>
      <li class="menu-item menu-item-search">
        <a role="button" class="popup-trigger"><i class="fa fa-search fa-fw"></i>搜索
        </a>
      </li>
  </ul>
</nav>



  <div class="search-pop-overlay">
    <div class="popup search-popup">
        <div class="search-header">
  <span class="search-icon">
    <i class="fa fa-search"></i>
  </span>
  <div class="search-input-container">
    <input autocomplete="off" autocapitalize="off"
           placeholder="搜索..." spellcheck="false"
           type="search" class="search-input">
  </div>
  <span class="popup-btn-close">
    <i class="fa fa-times-circle"></i>
  </span>
</div>
<div id="search-result">
  <div id="no-result">
    <i class="fa fa-spinner fa-pulse fa-5x fa-fw"></i>
  </div>
</div>

    </div>
  </div>

</div>
    </header>

    
  <div class="back-to-top">
    <i class="fa fa-arrow-up"></i>
    <span>0%</span>
  </div>


    <main class="main">
      <div class="main-inner">
        <div class="content-wrap">
          

          <div class="content post posts-expand">
            

    
  
  
  <article itemscope itemtype="http://schema.org/Article" class="post-block" lang="zh-CN">
    <link itemprop="mainEntityOfPage" href="http://yang0033.gitee.io/2018/11/08/iOS%20%E4%BD%BF%E7%94%A8%20agvtool%20%E7%AE%A1%E7%90%86%E9%A1%B9%E7%9B%AE%E7%89%88%E6%9C%AC%E5%8F%B7/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="https://tva2.sinaimg.cn/crop.259.17.290.290.180/c2abdfa9jw8ez7appr3p2j20g40a2t91.jpg?KID=imgbed,tva&Expires=1594186820&ssig=BdxhDdi1Ti">
      <meta itemprop="name" content="SuperYang">
      <meta itemprop="description" content="牛肉炒饭不要香菜，老板收钱">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="SuperYang`s Blog">
    </span>
      <header class="post-header">
        <h1 class="post-title" itemprop="name headline">
          使用 agvtool 管理项目版本号
        </h1>

        <div class="post-meta">
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-calendar"></i>
              </span>
              <span class="post-meta-item-text">发表于</span>

              <time title="创建时间：2018-11-08 18:14:00" itemprop="dateCreated datePublished" datetime="2018-11-08T18:14:00+08:00">2018-11-08</time>
            </span>
              <span class="post-meta-item">
                <span class="post-meta-item-icon">
                  <i class="far fa-calendar-check"></i>
                </span>
                <span class="post-meta-item-text">更新于</span>
                <time title="修改时间：2020-07-09 16:00:54" itemprop="dateModified" datetime="2020-07-09T16:00:54+08:00">2020-07-09</time>
              </span>
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-folder"></i>
              </span>
              <span class="post-meta-item-text">分类于</span>
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/iOS/" itemprop="url" rel="index"><span itemprop="name">iOS</span></a>
                </span>
            </span>

          
            <span id="/2018/11/08/iOS%20%E4%BD%BF%E7%94%A8%20agvtool%20%E7%AE%A1%E7%90%86%E9%A1%B9%E7%9B%AE%E7%89%88%E6%9C%AC%E5%8F%B7/" class="post-meta-item leancloud_visitors" data-flag-title="使用 agvtool 管理项目版本号" title="阅读次数">
              <span class="post-meta-item-icon">
                <i class="fa fa-eye"></i>
              </span>
              <span class="post-meta-item-text">阅读次数：</span>
              <span class="leancloud-visitors-count"></span>
            </span>
  
  <span class="post-meta-item">
    
      <span class="post-meta-item-icon">
        <i class="far fa-comment"></i>
      </span>
      <span class="post-meta-item-text">Valine：</span>
    
    <a title="valine" href="/2018/11/08/iOS%20%E4%BD%BF%E7%94%A8%20agvtool%20%E7%AE%A1%E7%90%86%E9%A1%B9%E7%9B%AE%E7%89%88%E6%9C%AC%E5%8F%B7/#valine-comments" itemprop="discussionUrl">
      <span class="post-comments-count valine-comment-count" data-xid="/2018/11/08/iOS%20%E4%BD%BF%E7%94%A8%20agvtool%20%E7%AE%A1%E7%90%86%E9%A1%B9%E7%9B%AE%E7%89%88%E6%9C%AC%E5%8F%B7/" itemprop="commentCount"></span>
    </a>
  </span>
  
  <br>
            <span class="post-meta-item" title="本文字数">
              <span class="post-meta-item-icon">
                <i class="far fa-file-word"></i>
              </span>
                <span class="post-meta-item-text">本文字数：</span>
              <span>2.6k</span>
            </span>
            <span class="post-meta-item" title="阅读时长">
              <span class="post-meta-item-icon">
                <i class="far fa-clock"></i>
              </span>
                <span class="post-meta-item-text">阅读时长 &asymp;</span>
              <span>2 分钟</span>
            </span>

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">

      
        <h1 id="使用-agvtool-管理项目版本号"><a href="#使用-agvtool-管理项目版本号" class="headerlink" title="使用 agvtool 管理项目版本号"></a>使用 agvtool 管理项目版本号</h1><blockquote>
<p>背景：发包后当版本号相同时，无法判断包的新旧，另外，苹果在上传包时也必须保证同一版本不允许上传相同build号的 IPA 文件，为此，开发了动态更新 ipa 包 build 号功能。</p>
</blockquote>
<hr>
<p>经过一系列调研和测试，目前 iOS 主项目使用的版本号生成策略为两个：</p>
<a id="more"></a> 
<h4 id="Xcode-Archive"><a href="#Xcode-Archive" class="headerlink" title="Xcode Archive:"></a>Xcode Archive:</h4><p>在项目上使用 shell 工具 <code>PlistBuddy</code> 来修改 info.plist 文件 build 号。<br>代码如下</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line">echo $CONFIGURATION</span><br><span class="line">if [ "Release" == "$&#123;CONFIGURATION&#125;" ]</span><br><span class="line">then</span><br><span class="line">buildNumber="`date +%y%m%d%H%M%S`"</span><br><span class="line">/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $buildNumber" "你的plist路径"</span><br><span class="line">echo "build number increase"</span><br><span class="line">fi</span><br></pre></td></tr></table></figure>
<p>在 Xcode -&gt; target -&gt; Build Phase 中添加一个 shell </p>
<p><img src="https://upload-images.jianshu.io/upload_images/1445110-5322f5973538068e.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/600" alt="添加脚本"></p>
<p><img src="https://upload-images.jianshu.io/upload_images/1445110-7f5985df3b9d38d3.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/600" alt="脚本设置"></p>
<hr>
<h4 id="Jenkins-Archive"><a href="#Jenkins-Archive" class="headerlink" title="Jenkins Archive:"></a>Jenkins Archive:</h4><p>由于 Jenkins 权限问题，无法正常使用 <code>PlistBuddy</code>。经过调研和测试，采用 <code>agvtool</code> 来管理版本号。<br>jenkins 的设置也非常简单，首先需要安装一个插件  <a href="https://wiki.jenkins.io/display/JENKINS/Build+Timestamp+Plugin" target="_blank" rel="noopener">Build Timestamp Plugin</a><br>，用于产生实时的时间戳，即可使用 <code>${BUILD_TIMESTAMP}</code>环境变量。<br>如果使用 <a href="https://wiki.jenkins.io/display/JENKINS/Xcode+Plugin" target="_blank" rel="noopener">Xcode plugin</a>，则如下图配置，如果不是可使用 <code>agvtool command line</code> 配置，参考下文。<br><img src="https://upload-images.jianshu.io/upload_images/1445110-1471c876fb4fc96b.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/800" alt="jenkins配置"></p>
<p><em>如果设置后 build 号没有更新，多半是你的项目还不支持 agvtool，下面会讲如何适配你的项目。</em></p>
<hr>
<h5 id="扩展：-agvtool"><a href="#扩展：-agvtool" class="headerlink" title="扩展： agvtool"></a>扩展： agvtool</h5><p>简单介绍下，agvtool 是苹果推出的一款用于管理软件版本号的工具，可以点击<a href="https://developer.apple.com/library/archive/qa/qa1827/_index.html" target="_blank" rel="noopener">官方文档</a> 查看细节。使用它可以轻松快捷的对项目 market-version 和 tech-version 进行快速自增和多 target 修改。<br><img src="https://upload-images.jianshu.io/upload_images/1445110-371f53522c4028f2.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/300" alt="market-version 和 tech-version"><br><img src="https://upload-images.jianshu.io/upload_images/1445110-97b3414bad90bcb7.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/600" alt="market-version 和 tech-version"></p>
<h6 id="agvtool-使用前需要修改一些配置"><a href="#agvtool-使用前需要修改一些配置" class="headerlink" title="agvtool 使用前需要修改一些配置"></a>agvtool 使用前需要修改一些配置</h6><ol>
<li>修改 Current Project Version 的值为一个整数，配置 Versioning System 为 Apple Generic<br><img src="https://upload-images.jianshu.io/upload_images/1445110-d873152660f1da69.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/600" alt="配置1"></li>
<li>设置你的 market-version(<code>CFBundleShortVersionString</code>) 和 tech-version(<code>CFBundleVersion</code>)<br><img src="https://upload-images.jianshu.io/upload_images/1445110-84befb049b7f32d6.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/800" alt="设置版本号"></li>
<li>为避免执行 agvtool 时报 <code>Cannot find &quot;$(SRCROOT)／Info.plist</code>, 需要删除的plist路径中的 <code>$(SRCROOT)</code>，如下图。<br><img src="https://upload-images.jianshu.io/upload_images/1445110-cb5d03d439901b0c.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240" alt="移除$(SRCROOT)"><h6 id="agvtool-command-line的一些基本功能"><a href="#agvtool-command-line的一些基本功能" class="headerlink" title="agvtool command line的一些基本功能"></a><code>agvtool command line</code>的一些基本功能</h6></li>
<li>更新 market-version 为指定的版本<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">agvtool new-marketing-version &lt;your_specific_version&gt;</span><br></pre></td></tr></table></figure>
示例：更新 market-version 为 2.0<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">$ xcrun agvtool new-marketing-version 2.0</span><br><span class="line">Setting CFBundleShortVersionString of project MyProject to:</span><br><span class="line">    2.0.</span><br><span class="line">Updating CFBundleShortVersionString in Info.plist(s)...</span><br><span class="line">Updated CFBundleShortVersionString in &quot;MyProject.xcodeproj&#x2F;..&#x2F;MyProject&#x2F;MyProject-Info.plist&quot; to 2.0</span><br></pre></td></tr></table></figure></li>
<li>更新 tech-version (Build 号)<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">agvtool next-version -all  # 其中 -all 为所有 target</span><br><span class="line">&#96;&#96;&#96; </span><br><span class="line">示例：自动加一到更大的整数</span><br></pre></td></tr></table></figure>
$ xcrun agvtool next-version -all<br>Setting version of project MyProject to:</li>
<li>Also setting CFBundleVersion key (assuming it exists)<br>Updating CFBundleVersion in Info.plist(s)…<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">注意：&#96;agvtool next-version -all&#96; 会自增 build 值到更大的整数,例如 1&#x3D;&gt;2，1.3 &#x3D;&gt; 2。</span><br><span class="line"></span><br><span class="line">3. 设置 tech-version (Build 号) 为指定值</span><br></pre></td></tr></table></figure>
agvtool new-version -all <your_specific_version><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">示例：设置 Build 号为 2.6.9</span><br></pre></td></tr></table></figure>
$ xcrun agvtool new-version -all 2.6.9<br>Setting version of project MyProject to:</li>
<li>6.9</li>
</ol>
<p>Also setting CFBundleVersion key (assuming it exists)</p>
<p>Updating CFBundleVersion in Info.plist(s)…</p>
<p>Updated CFBundleVersion in “MyProject.xcodeproj/../MyProject/MyProject-Info.plist” to 2.6.9</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">4. 查看当前 market-version</span><br></pre></td></tr></table></figure>
<p>agvtool what-marketing-version</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">示例：查看当前 market-version  版本号</span><br></pre></td></tr></table></figure>
<p>$ xcrun agvtool what-marketing-version<br>No marketing version number (CFBundleShortVersionString) found for Jambase targets.</p>
<p>Looking for marketing version in native targets…<br>Looking for marketing version (CFBundleShortVersionString) in native targets…</p>
<p>Found CFBundleShortVersionString of “2.0” in “MyProject.xcodeproj/../MyProject/MyProject-Info.plist”</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">5. 查看当前 tech-version（Build 号）</span><br></pre></td></tr></table></figure>
<p>agvtool what-version</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">示例：查看当前 Build 号</span><br></pre></td></tr></table></figure>
<p>$ xcrun agvtool what-version<br>Current version of project MyProject is:<br>2.2</p>
<pre><code>











</code></pre>
    </div>

    
    
    
        

  <div class="followme">
    <p>欢迎关注我的其它发布渠道</p>

    <div class="social-list">

        <div class="social-item">
          <a target="_blank" class="social-link" href="https://www.jianshu.com/u/f37a8f0ba6f8">
            <span class="icon">
              <i class="fas fa-book"></i>
            </span>

            <span class="label">简书</span>
          </a>
        </div>
    </div>
  </div>


      <footer class="post-footer">
          <div class="post-tags">
              <a href="/tags/%E5%B7%A5%E7%A8%8B%E7%AE%A1%E7%90%86/" rel="tag"># 工程管理</a>
          </div>

        


        
    <div class="post-nav">
      <div class="post-nav-item">
    <a href="/2018/06/12/iOS-%E5%A6%82%E4%BD%95%E6%8E%A7%E5%88%B6%E7%8A%B6%E6%80%81%E6%A0%8F%E6%A0%B7%E5%BC%8F/" rel="prev" title="iOS-如何控制状态栏样式">
      <i class="fa fa-chevron-left"></i> iOS-如何控制状态栏样式
    </a></div>
      <div class="post-nav-item">
    <a href="/2019/08/18/iOS%20%20lint%20%E8%87%AA%E5%8A%A8%E5%8C%96%E8%AF%95%E6%B0%B4/" rel="next" title="iOS  lint 自动化试水">
      iOS  lint 自动化试水 <i class="fa fa-chevron-right"></i>
    </a></div>
    </div>
      </footer>
    
  </article>
  
  
  



          </div>
          
    <div class="comments" id="valine-comments"></div>

<script>
  window.addEventListener('tabs:register', () => {
    let { activeClass } = CONFIG.comments;
    if (CONFIG.comments.storage) {
      activeClass = localStorage.getItem('comments_active') || activeClass;
    }
    if (activeClass) {
      let activeTab = document.querySelector(`a[href="#comment-${activeClass}"]`);
      if (activeTab) {
        activeTab.click();
      }
    }
  });
  if (CONFIG.comments.storage) {
    window.addEventListener('tabs:click', event => {
      if (!event.target.matches('.tabs-comment .tab-content .tab-pane')) return;
      let commentClass = event.target.classList[1];
      localStorage.setItem('comments_active', commentClass);
    });
  }
</script>

        </div>
          
  
  <div class="toggle sidebar-toggle">
    <span class="toggle-line toggle-line-first"></span>
    <span class="toggle-line toggle-line-middle"></span>
    <span class="toggle-line toggle-line-last"></span>
  </div>

  <aside class="sidebar">
    <div class="sidebar-inner">

      <ul class="sidebar-nav motion-element">
        <li class="sidebar-nav-toc">
          文章目录
        </li>
        <li class="sidebar-nav-overview">
          站点概览
        </li>
      </ul>

      <!--noindex-->
      <div class="post-toc-wrap sidebar-panel">
          <div class="post-toc motion-element"><ol class="nav"><li class="nav-item nav-level-1"><a class="nav-link" href="#使用-agvtool-管理项目版本号"><span class="nav-number">1.</span> <span class="nav-text">使用 agvtool 管理项目版本号</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#Xcode-Archive"><span class="nav-number">1.0.0.1.</span> <span class="nav-text">Xcode Archive:</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#Jenkins-Archive"><span class="nav-number">1.0.0.2.</span> <span class="nav-text">Jenkins Archive:</span></a><ol class="nav-child"><li class="nav-item nav-level-5"><a class="nav-link" href="#扩展：-agvtool"><span class="nav-number">1.0.0.2.1.</span> <span class="nav-text">扩展： agvtool</span></a><ol class="nav-child"><li class="nav-item nav-level-6"><a class="nav-link" href="#agvtool-使用前需要修改一些配置"><span class="nav-number">1.0.0.2.1.1.</span> <span class="nav-text">agvtool 使用前需要修改一些配置</span></a></li><li class="nav-item nav-level-6"><a class="nav-link" href="#agvtool-command-line的一些基本功能"><span class="nav-number">1.0.0.2.1.2.</span> <span class="nav-text">agvtool command line的一些基本功能</span></a></li></ol></li></ol></li></ol></li></ol></li></ol></li></ol></div>
      </div>
      <!--/noindex-->

      <div class="site-overview-wrap sidebar-panel">
        <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
    <img class="site-author-image" itemprop="image" alt="SuperYang"
      src="https://tva2.sinaimg.cn/crop.259.17.290.290.180/c2abdfa9jw8ez7appr3p2j20g40a2t91.jpg?KID=imgbed,tva&Expires=1594186820&ssig=BdxhDdi1Ti">
  <p class="site-author-name" itemprop="name">SuperYang</p>
  <div class="site-description" itemprop="description">牛肉炒饭不要香菜，老板收钱</div>
</div>
<div class="site-state-wrap motion-element">
  <nav class="site-state">
      <div class="site-state-item site-state-posts">
          <a href="/archives/">
        
          <span class="site-state-item-count">39</span>
          <span class="site-state-item-name">日志</span>
        </a>
      </div>
      <div class="site-state-item site-state-categories">
            <a href="/categories/">
          
        <span class="site-state-item-count">5</span>
        <span class="site-state-item-name">分类</span></a>
      </div>
      <div class="site-state-item site-state-tags">
            <a href="/tags/">
          
        <span class="site-state-item-count">31</span>
        <span class="site-state-item-name">标签</span></a>
      </div>
  </nav>
</div>
  <div class="links-of-author motion-element">
      <span class="links-of-author-item">
        <a href="https://github.com/yangchao0033" title="GitHub → https:&#x2F;&#x2F;github.com&#x2F;yangchao0033" rel="noopener" target="_blank"><i class="fab fa-github fa-fw"></i>GitHub</a>
      </span>
      <span class="links-of-author-item">
        <a href="mailto:ygrfwyc@gmail.com" title="E-Mail → mailto:ygrfwyc@gmail.com" rel="noopener" target="_blank"><i class="fa fa-envelope fa-fw"></i>E-Mail</a>
      </span>
      <span class="links-of-author-item">
        <a href="https://weibo.com/yangchao0033" title="Weibo → https:&#x2F;&#x2F;weibo.com&#x2F;yangchao0033" rel="noopener" target="_blank"><i class="fab fa-weibo fa-fw"></i>Weibo</a>
      </span>
      <span class="links-of-author-item">
        <a href="https://www.jianshu.com/u/f37a8f0ba6f8" title="简书 → https:&#x2F;&#x2F;www.jianshu.com&#x2F;u&#x2F;f37a8f0ba6f8" rel="noopener" target="_blank"><i class="fas fa-book fa-fw"></i>简书</a>
      </span>
      <span class="links-of-author-item">
        <a href="https://t.me/superYang0033" title="Telegram → https:&#x2F;&#x2F;t.me&#x2F;superYang0033" rel="noopener" target="_blank"><i class="fab fa-telegram fa-fw"></i>Telegram</a>
      </span>
  </div>



      </div>

      
        <div id="music163player">
        <iframe frameborder="no" border="0" marginwidth="0" marginheight="0" width=350 height=86 src="//music.163.com/outchain/player?type=2&id=31473269&auto=0&height=66">
        </iframe>
        </div>
    </div>

    

  </aside>
  <div id="sidebar-dimmer"></div>


      </div>
    </main>

    <footer class="footer">
      <div class="footer-inner">
        

        

<div class="copyright">
  
  &copy; 
  <span itemprop="copyrightYear">2020</span>
  <span class="with-love">
    <i class="fa fa-heart"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">SuperYang</span>
    <span class="post-meta-divider">|</span>
    <span class="post-meta-item-icon">
      <i class="fa fa-chart-area"></i>
    </span>
    <span title="站点总字数">157k</span>
    <span class="post-meta-divider">|</span>
    <span class="post-meta-item-icon">
      <i class="fa fa-coffee"></i>
    </span>
    <span title="站点阅读时长">2:23</span>
</div>
  <div class="powered-by">由 <a href="https://hexo.io/" class="theme-link" rel="noopener" target="_blank">Hexo</a> & <a href="https://theme-next.org/" class="theme-link" rel="noopener" target="_blank">NexT.Gemini</a> 强力驱动
  </div>

        








      </div>
    </footer>
  </div>

  
  <script src="/lib/anime.min.js"></script>
  <script src="/lib/velocity/velocity.min.js"></script>
  <script src="/lib/velocity/velocity.ui.min.js"></script>

<script src="/js/utils.js"></script>

<script src="/js/motion.js"></script>


<script src="/js/schemes/pisces.js"></script>


<script src="/js/next-boot.js"></script>




  
  <script>
    (function(){
      var canonicalURL, curProtocol;
      //Get the <link> tag
      var x=document.getElementsByTagName("link");
		//Find the last canonical URL
		if(x.length > 0){
			for (i=0;i<x.length;i++){
				if(x[i].rel.toLowerCase() == 'canonical' && x[i].href){
					canonicalURL=x[i].href;
				}
			}
		}
    //Get protocol
	    if (!canonicalURL){
	    	curProtocol = window.location.protocol.split(':')[0];
	    }
	    else{
	    	curProtocol = canonicalURL.split(':')[0];
	    }
      //Get current URL if the canonical URL does not exist
	    if (!canonicalURL) canonicalURL = window.location.href;
	    //Assign script content. Replace current URL with the canonical URL
      !function(){var e=/([http|https]:\/\/[a-zA-Z0-9\_\.]+\.baidu\.com)/gi,r=canonicalURL,t=document.referrer;if(!e.test(r)){var n=(String(curProtocol).toLowerCase() === 'https')?"https://sp0.baidu.com/9_Q4simg2RQJ8t7jm9iCKT-xh_/s.gif":"//api.share.baidu.com/s.gif";t?(n+="?r="+encodeURIComponent(document.referrer),r&&(n+="&l="+r)):r&&(n+="?l="+r);var i=new Image;i.src=n}}(window);})();
  </script>




  
<script src="/js/local-search.js"></script>













  

  

  

  <script async src="/js/cursor/fireworks.js"></script>



<script>
NexT.utils.loadComments(document.querySelector('#valine-comments'), () => {
  NexT.utils.getScript('//unpkg.com/valine/dist/Valine.min.js', () => {
    var GUEST = ['nick', 'mail', 'link'];
    var guest = 'nick,mail,link';
    guest = guest.split(',').filter(item => {
      return GUEST.includes(item);
    });
    new Valine({
      el         : '#valine-comments',
      verify     : true,
      notify     : true,
      appId      : 'zizRqalUJY55Xc5oBJKbhxpV-gzGzoHsz',
      appKey     : '64gPcVi8lIA8zVGpBSEk7uKu',
      placeholder: "留言板无需注册登录，快来评论吧。。",
      avatar     : 'mm',
      meta       : guest,
      pageSize   : '10' || 10,
      visitor    : true,
      lang       : '' || 'zh-cn',
      path       : location.pathname,
      recordIP   : false,
      serverURLs : ''
    });
  }, window.Valine);
});
</script>

</body>
</html>
